{any_include file="scp_page_start.tpl" wide=1}

<!-- $Id$ -->

<h1>OAuth - Keys To Other Sites</h1>

{any_include file="scp_oauth_menu.tpl"}

<p>
	Search the list of registered keys:
</p>

<form action="{$rel_path}module/OAuth/consumer/list" method="GET">
<p>
	<input class="text" style="float:left" type="text" name="q_mm" value="{$smarty.get.q_mm}" />
	<input class="submit" type="submit" value="Search Key" />
</p>
</form>

<div class="clear"></div>

<h2>Select Server</h2>

<p>Select the server with which you want to make a connection:</p>

<ul>
{foreach from=$servers item="s"}
<li>
	<h3><a href="{$rel_path}module/OAuth/consumer/connect?consumer_key={$s.consumer_key|escape:"url"}">{$s.server_uri_host|escape}<small>{$s.server_uri_path|escape}</small></a></h3>

{if $any_config.debugging.oauth.show_tokens}
	<p>
		Key: <strong>{$s.consumer_key|escape}</strong>
		{if $any_config.debugging.oauth.log_menu}
			<a href="{$rel_path}module/OAuth/log?osr_consumer_key={$s.consumer_key|escape:"url"}">[log]</a>
		{/if}
		Secret: <strong>{$s.consumer_secret|escape}</strong>
	</p>	
{/if}

</li>
{foreachelse}
<li>
	<p class="notice">No servers found, you can add a new one.</p>
</li>
{/foreach}
</ul>

<h2>Add New Server</h2>

<p>When the server you want to connect to is not in the above list, then you can add that server to the list of known servers.</p>

<p>
	<a class="button" href="{$rel_path}module/OAuth/consumer/register">Add A New Key And Secret</a>
</p>

{any_include file="scp_page_end.tpl" wide=1}
